package com.wanggsx.wanggsx_module1;

import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.wanggsx.library.util.arouter.ConstrantRoutes;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

@Route(path = ConstrantRoutes.MODULE1_ACTIVITY_MAIN)
public class MainActivity extends AppCompatActivity {

    @BindView(R2.id.tvName1_main_activity)
    Button mBtnClick;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
        mBtnClick.setText("here is module1 MainActivity");
    }

    @Override
    protected void onResume() {
        super.onResume();
    }

    @OnClick(R2.id.tvName1_main_activity)
    void onViewClick(View v){
        if (R.id.tvName1_main_activity == v.getId()){
            ARouter.getInstance().build(ConstrantRoutes.MODULE1_ACTIVITY_SECOND).navigation();
            finish();
        }
    }
}
